View Javadoc
1 /* 2 Java Regular Expressions Plugin API. 3 4 Copyright (C) 2002 Jose San Leandro Armend?riz 5 jsanleandro@yahoo.es 6 chousz@yahoo.com 7 8 This library is free software; you can redistribute it and/or 9 modify it under the terms of the GNU Lesser General Public 10 License as published by the Free Software Foundation; either 11 version 2.1 of the License, or (at your option) any later version. 12 13 This library is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 Lesser General Public License for more details. 17 18 You should have received a copy of the GNU Lesser General Public 19 License along with this library; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 22 Thanks to ACM S.L. for distributing this library under the LGPL license. 23 Contact info: jsr000@terra.es 24 Postal Address: c/Playa de Lagoa, 1 25 Urb. Valdecaba?as 26 Boadilla del monte 27 28660 Madrid 28 Spain 29 30 This library uses some external APIs. So far I haven't released such 31 APIs as projects themselves, but you should be able 32 to download them from the web page where you got this source code. 33 34 ****************************************************************************** 35 * 36 * Filename: $RCSfile: PatternJDKAdapter.java,v $ 37 * 38 * Author: Jose San Leandro Armend?riz 39 * 40 * Description: Adapts JDK1.4 Pattern objects to follow the 41 * generic Pattern interface defined in this API. 42 * 43 * Last modified by: $Author: dev $ at $Date: 2002/09/27 08:58:38 $ 44 * 45 * File version: $Revision: 1.4 $ 46 * 47 * Project version: $Name: $ 48 * ("Name" means no concrete version has been checked out) 49 * 50 * $Id: PatternJDKAdapter.java,v 1.4 2002/09/27 08:58:38 dev Exp $ 51 * 52 */ 53 package org.acmsl.regexpplugin.jdk14regexp; 54 55 /* 56 * Importing some ACM classes. 57 */ 58 import org.acmsl.version.Version; 59 import org.acmsl.version.VersionFactory; 60 61 /* 62 * Importing some JDK1.4 classes. 63 */ 64 import java.util.regex.Pattern; 65 66 /*** 67 * Adapts JDK1.4 pattern objects to follow the generic 68 * Pattern interface defined in this API. 69 * @author <a href="mailto:jsanleandro@yahoo.es" 70 >Jose San Leandro Armend?riz</a> 71 * @version $Revision: 1.4 $ 72 */ 73 public class PatternJDKAdapter 74 implements org.acmsl.regexpplugin.Pattern 75 { 76 /*** 77 * Delegated instance. 78 */ 79 private Pattern m__Instance; 80 81 /*** 82 * Constructs a PatternJDKAdapter for given object. 83 * @param adaptee the instance to be adapted. 84 */ 85 public PatternJDKAdapter(Pattern adaptee) 86 { 87 setDelegatedInstance(adaptee); 88 } 89 90 /*** 91 * Sets the pattern to adapt. 92 * Note: This method has package private access rights. 93 * @param adaptee the adaptee. 94 */ 95 void setDelegatedInstance(Pattern adaptee) 96 { 97 m__Instance = adaptee; 98 } 99 100 /*** 101 * Retrieves an instance of the Pattern class. 102 * Note: This method has package private access rights. 103 * @return such instance. 104 */ 105 Pattern getDelegatedInstance() 106 { 107 return m__Instance; 108 } 109 110 /*** 111 * Concrete version object updated everytime it's checked-in in a CVS 112 * repository. 113 */ 114 public static final Version VERSION = 115 VersionFactory.createVersion("$Revision: 1.4 $"); 116 117 /*** 118 * Retrieves the current version of this object. 119 * @return the version object with such information. 120 */ 121 public Version getVersion() 122 { 123 return VERSION; 124 } 125 126 /*** 127 * Retrieves the current version of this class. 128 * @return the object with class version information. 129 */ 130 public static Version getClassVersion() 131 { 132 return VERSION; 133 } 134 }

This page was automatically generated by Maven